messageAuthenticationCode
Type
function
Summary
Compute a message authentication code.
Syntax
messageAuthenticationCode(<message>, <key>, <codeType>)
Description
messageAuthenticationCode provides a way to check the integrity of information transmitted over or stored in an unreliable medium is a prime necessity in the world of open computing and communications. Mechanisms that provide such integrity check based on a secret key are usually called "message authentication codes" (MAC). Typically, message authentication codes are used between two parties that share a secret key in order to validate information transmitted between these parties. messageAuthenticationCode also uses a secret key for calculation of the message authentication values.
Parameters
Name | Type | Description |
---|---|---|
message | A binary data string. | |
key | A binary data string. | |
codeType | The cryptographic hash function to use
|
Examples
local tHMAC
put messageAuthenticationCode("My Data", "My Secret", "HMAC-SHA-256") into tHMAC
Related
function: messageDigest
glossary: binary data